import datetime


class Estate:
    code = ''
    url = ''

    def __init__(self):
        self.title = ''  # 标题
        self.housing_estate = ''  # 小区
        self.house_type = ''  # 户型
        self.size = 0  # 大小
        self.orientation = ''  # 朝向
        self.fitment = ''  # 装修
        self.elevator = ''  # 电梯
        self.address = ''  # 地址
        self.region = ''  # 区域
        self.publish_date = ''  # 发布日期
        self.total_price = -1  # 总价
        self.description = ''  # 描述
        self.create_date = "%s-%s-%s" % (
        datetime.datetime.now().year, datetime.datetime.now().month, datetime.datetime.now().day)  # 创建日期

    def set_title(self, title):
        self.title = title
        return self

    def set_housing_estate(self, housing_estate):
        self.housing_estate = housing_estate
        return self
